package com.ckr.myrule;

import com.netflix.loadbalancer.IRule;
//import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Shadowckr
 * @create 2022-01-25 11:08
 */

@Configuration
public class MySelfRule {
    @Bean
    public IRule myRule() {
//        return new RandomRule(); //Ribbon默认是轮询，我们自定义为随机算法
        return new AceFiveRule();//Ribbon默认是轮询，我们自定义为AceFiveRule

    }

}
